package com.yt.order.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.yt.order.models.dto.WorkOrderEvaluationDTO;
import com.yt.order.models.vo.WorkOrderEvaluationVO;
import com.yt.order.models.bo.WorkOrderEvaluationQueryBO;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 *
 * @author chen
 * @Date 2025-09-22
 */
public interface WorkOrderEvaluationMapper extends BaseMapper<WorkOrderEvaluationDTO> {

    /**
     * 根据工单ID查询有效评价
     * @param orderId 工单ID
     * @return 评价DTO
     */
    WorkOrderEvaluationDTO selectByOrderId(Long orderId);

    List<WorkOrderEvaluationVO> selectEmpEvaluations(@Param("bo") WorkOrderEvaluationQueryBO bo);
    List<WorkOrderEvaluationVO> selectEvaluatorEvaluations(@Param("bo") WorkOrderEvaluationQueryBO bo);

    // 总条数查询方法
    Integer countEmpEvaluations(@Param("bo") WorkOrderEvaluationQueryBO bo);
    Integer countEvaluatorEvaluations(@Param("bo") WorkOrderEvaluationQueryBO bo);
}